﻿@model ViewModels.LogOn.LogonModel

<form method="post" action="/api/LogOn/_Pwd" zyf-logon-form>
    <div class="form-group">
        <label>用户名：（* 必填）</label>
        <input asp-for="PhoneNumberOrName" class="form-control" placeholder="用户名/手机号">
        <span asp-validation-for="PhoneNumberOrName" class="text-danger"></span>
    </div>
    <div class="form-group">
        <label>密码：（* 必填）</label><a class="text-primary float-right" 
            href="/Pwd/Forget?@ViewContext.HttpContext.Request.GetPrepage()">重置密码</a>
        <input asp-for="Password" type="password" class="form-control" placeholder="不少于6个字符" />
        <span asp-validation-for="Password" class="text-danger"></span>
    </div>
    <div class="form-group">
        <label>验证码：（* 必填）</label>
        <br />
        <partial name="../Captcha/_Get" controller="Captcha">
    </div>
    <partial name="../LogOn/_Button">
</form>


<script>

    $('[zyf-logon-form]').submit(function (event) {
        formSubmit(event, {
            success: function (data) {
                location.reload();
            },
            failed: function () {
                initCaptcha();
            }
        })
    });
</script>